package com.autoplaza;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View.OnClickListener;
import android.view.ViewGroup.LayoutParams;
import android.view.View;
import android.view.Window;
import android.webkit.WebView;
import android.widget.Button;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;

public class PreguntasFrecuentes extends Activity {
	/**
	 * @see android.app.Activity#onCreate(Bundle)
	 */
	public Button btnmenu;
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		requestWindowFeature(Window.FEATURE_NO_TITLE);
		setContentView(R.layout.preguntasfrecuentes);
		
		btnmenu = (Button) findViewById(R.id.btn_menu);
		btnmenu.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {

				Intent goManuLateral = new Intent(PreguntasFrecuentes.this, MenuLateral.class);
				goManuLateral.putExtra("clase","PreguntasFrecuentes");
				startActivity(goManuLateral);

			}
		});
		
		int size = Utils.getScreenSize2(PreguntasFrecuentes.this);
		if( size == 1){
			RelativeLayout lin = (RelativeLayout) findViewById(R.id.linearLayout1);
			lin.setLayoutParams(new LinearLayout.LayoutParams(LayoutParams.MATCH_PARENT, 30));
			RelativeLayout.LayoutParams params0 = new RelativeLayout.LayoutParams(25, 25);
			params0.addRule(RelativeLayout.CENTER_HORIZONTAL);
			params0.addRule(RelativeLayout.CENTER_VERTICAL);
			params0.addRule(RelativeLayout.ALIGN_PARENT_LEFT);
			btnmenu.setLayoutParams(params0);
//			btnmenu.setLayoutParams(new LinearLayout.LayoutParams(30, 30));
		}		
		if( size == 2){
			RelativeLayout lin = (RelativeLayout) findViewById(R.id.linearLayout1);
			lin.setLayoutParams(new LinearLayout.LayoutParams(LayoutParams.MATCH_PARENT, 60));	
			RelativeLayout.LayoutParams params0 = new RelativeLayout.LayoutParams(50, 50);
			params0.addRule(RelativeLayout.CENTER_HORIZONTAL);
			params0.addRule(RelativeLayout.CENTER_VERTICAL);
			params0.addRule(RelativeLayout.ALIGN_PARENT_LEFT);
			btnmenu.setLayoutParams(params0);
//			btnmenu.setLayoutParams(new LinearLayout.LayoutParams(45, 45));

		}		
		if( size == 3){
			RelativeLayout lin = (RelativeLayout) findViewById(R.id.linearLayout1);
			lin.setLayoutParams(new LinearLayout.LayoutParams(LayoutParams.MATCH_PARENT, 80));
			RelativeLayout.LayoutParams params0 = new RelativeLayout.LayoutParams(70, 70);
			params0.addRule(RelativeLayout.CENTER_HORIZONTAL);
			params0.addRule(RelativeLayout.CENTER_VERTICAL);
			params0.addRule(RelativeLayout.ALIGN_PARENT_LEFT);
			btnmenu.setLayoutParams(params0);
//			btnmenu.setLayoutParams(new LinearLayout.LayoutParams(80, 80));

		}
		
		WebView webView = (WebView) findViewById(R.id.webView1);
		webView.getSettings().setJavaScriptEnabled(true);
		webView.loadUrl("http://iphone.autoplaza.com.mx/PFrecuentes/PFrecuentes.aspx");
	
	}
}



//04-30 16:41:30.168: I/URL(10869): 
//	
//	http://www.autoplaza.com.mx/systems/AtencionQueja/xt_atenciondetalleIphone.asp?Nombre=jose&Email=jose&Combocomentarios=9&Comentario=Prueba&telof1=675&telof2=25757&NoAnuncio=

